package leecode

import (
	"fmt"
	"strings"
)

func isPalindrome(s string) bool {
	s = strings.ToLower(s)
	left := 0
	right := len(s) - 1
	for left < right {
		fmt.Println(s[left])
		if (s[left] < 'a' || s[left] > 'z') && (s[left] < '0' || s[left] > '9') {
			left++
		} else if (s[right] < 'a' || s[right] > 'z') && (s[right] < '0' || s[right] > '9') {
			right--
		} else {
			if s[left] != s[right] {
				return false
			}
			left++
			right--
		}
	}
	return true
}
